return log_large_page_sizes[0] - PAGE_SHIFT;
}
-
/* This is more a platform thing than a CPU thing, but we only have
* one platform now */
int cpu_io_mfn(ulong mfn)
return 0;
}
+int cpu_threads(int cpuid)
+{
+ return 1;
+}
+
+
static u64 cpu0_hids[6];
static u64 cpu0_hior;
set_current(idle_domain->vcpu[0]);
idle_vcpu[0] = current;
- /* for some reason we need to set our own bit in the thread map */
- cpu_set(0, cpu_sibling_map[0]);
-
initialize_keytable();
/* Register another key that will allow for the the Harware Probe
* to be contacted, this works with RiscWatch probes and should
int cpuid;
for_each_present_cpu(cpuid) {
+ int threads;
+ int i;
+
+ threads = cpu_threads(cpuid);
+ for (i = 0; i < threads; i++)
+ cpu_set(i, cpu_sibling_map[cpuid]);
+
+ /* For now everything is single core */
+ cpu_set(0, cpu_core_map[cpuid]);
+
+ numa_set_node(cpuid, 0);
+ numa_add_cpu(cpuid);
+
if (cpuid == 0)
continue;
if (cpuid >= maxcpus)
/* wait for it */
while (!cpu_online(cpuid))
cpu_relax();
-
- numa_set_node(cpuid, 0);
- numa_add_cpu(cpuid);
}
return 0;
{
xen_sysctl_physinfo_t *pi = &sysctl->u.physinfo;
- pi->threads_per_core = 1;
- pi->cores_per_socket = 1;
- pi->sockets_per_node = 1;
+ pi->threads_per_core =
+ cpus_weight(cpu_sibling_map[0]);
+ pi->cores_per_socket =
+ cpus_weight(cpu_core_map[0]) / pi->threads_per_core;
+ pi->sockets_per_node =
+ num_online_cpus() / cpus_weight(cpu_core_map[0]);
+
pi->nr_nodes = 1;
pi->total_pages = total_pages;
pi->free_pages = avail_domheap_pages();
extern void cpu_initialize(int cpuid);
extern void cpu_init_vcpu(struct vcpu *);
extern int cpu_io_mfn(ulong mfn);
+extern int cpu_threads(int cpuid);
extern void save_cpu_sprs(struct vcpu *);
extern void load_cpu_sprs(struct vcpu *);
extern void flush_segments(void);